{extend name="layout/layout" /}

{block name="content"}
<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form h between">
        <div class="layui-inline searchBox">
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="name" placeholder="请输入活动商品名称" />
            </div>
            <div class="layui-input-inline">
                <select name="act_status">
                    <option value="">所有活动状态</option>
                    <option value="1">待生效</option>
                    <option value="2">已生效</option>
                    <option value="3">已过期</option>
                </select>
            </div>
            <div class="layui-input-inline" style="width: 300px;">
                <input type="text" class="layui-input lay-date-range" name="range_date" value="" placeholder="时间">
            </div>
            <input type="text" class="layui-input" value="阻止回车键提交" style="display: none;">
            <a class="layui-btn search_btn" data-type="reload">搜索</a>
            <button type="reset" class="layui-btn layui-btn-danger reset_btn"><i class="layui-icon">&#xe669;</i></button>
        </div>
        <div class="layui-inline">
            <a href="javascript:;" class="layui-btn layui-btn-normal add_btn"><i class="layui-icon"></i> 新增</a>
        </div>
    </form>
</blockquote>

<table id="dataTable" lay-filter="dataTable"></table>

<input type="hidden" class="datalist_url" value="{:url('admin/flashsale/index')}">
<input type="hidden" class="add_url" value="{:url('admin/flashsale/add')}">
<input type="hidden" class="edit_url" value="{:url('admin/flashsale/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/flashsale/delete')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/flashsale.js" type="text/javascript"></script>
<script>
    layui.use(['layer', 'laydate'], function(){
        var $ = layui.jquery,
            laydate = layui.laydate;
        // 执行一个laydate实例
        var laydate = laydate.render({
            elem: '.lay-date-range', //指定元素
            type: 'datetime',
            range: '~', // '~' 自定义分割字符
            format: 'yyyy-MM-dd H:m:s',
            trigger: 'click',
            done: function(value, date){

            }
        });
    });
</script>
{/block}